import request from '@/utils/request'

// 查询订单支付列表
export function listOrderPay(query) {
  return request({
    url: '/console/orderPay/list',
    method: 'get',
    params: query
  })
}

// 查询订单支付详细
export function getOrderPay(id) {
  return request({
    url: '/console/orderPay/' + id,
    method: 'get'
  })
}

// 订单支付
export function toOrderPay(id, payPwd) {
  const param = {id, payPwd}
  return request({
    url: '/console/orderPay/toOrderPay',
    method: 'post',
    params: param
  })
}

// 驳回订单支付
export function toOrderRejectPay(id, payPwd, remark) {
  const param = {id, payPwd, remark}
  return request({
    url: '/console/orderPay/toOrderRejectPay',
    method: 'post',
    params: param
  })
}

// 查询发票开票订单
export function listOrderPayForInvoice(query) {
  return request({
    url: '/console/orderPay/listForInvoice',
    method: 'get',
    params: query
  })
}
